// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "build/build_config.h"
#include "pdf/accessibility_structs.h"
#include "pdf/content_restriction.h"
#include "pdf/document_metadata.h"
#include "ppapi/c/pp_input_event.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/c/private/ppp_pdf.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/pdfium/public/fpdf_edit.h"
#include "third_party/pdfium/public/fpdf_formfill.h"
#include "third_party/pdfium/public/fpdf_fwlevent.h"
#include "third_party/pdfium/public/fpdf_sysfontinfo.h"
#include "third_party/pdfium/public/fpdfview.h"
#include "ui/events/keycodes/keyboard_codes.h"

#if BUILDFLAG(IS_WIN)
#include "pdf/pdf.h"
#endif

namespace chrome_pdf {

#define STATIC_ASSERT_ENUM(a, b)                            \
  static_assert(static_cast<int>(a) == static_cast<int>(b), \
                "mismatching enums: " #a)

STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kShiftKey,
                   FWL_EVENTFLAG_ShiftKey);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kControlKey,
                   FWL_EVENTFLAG_ControlKey);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kAltKey,
                   FWL_EVENTFLAG_AltKey);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kMetaKey,
                   FWL_EVENTFLAG_MetaKey);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kIsKeyPad,
                   FWL_EVENTFLAG_KeyPad);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kIsAutoRepeat,
                   FWL_EVENTFLAG_AutoRepeat);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kLeftButtonDown,
                   FWL_EVENTFLAG_LeftButtonDown);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kMiddleButtonDown,
                   FWL_EVENTFLAG_MiddleButtonDown);
STATIC_ASSERT_ENUM(blink::WebInputEvent::Modifiers::kRightButtonDown,
                   FWL_EVENTFLAG_RightButtonDown);

STATIC_ASSERT_ENUM(ui::VKEY_BACK, FWL_VKEY_Back);
STATIC_ASSERT_ENUM(ui::VKEY_TAB, FWL_VKEY_Tab);
STATIC_ASSERT_ENUM(ui::VKEY_CLEAR, FWL_VKEY_Clear);
STATIC_ASSERT_ENUM(ui::VKEY_RETURN, FWL_VKEY_Return);
STATIC_ASSERT_ENUM(ui::VKEY_SHIFT, FWL_VKEY_Shift);
STATIC_ASSERT_ENUM(ui::VKEY_CONTROL, FWL_VKEY_Control);
STATIC_ASSERT_ENUM(ui::VKEY_MENU, FWL_VKEY_Menu);
STATIC_ASSERT_ENUM(ui::VKEY_PAUSE, FWL_VKEY_Pause);
STATIC_ASSERT_ENUM(ui::VKEY_CAPITAL, FWL_VKEY_Capital);
STATIC_ASSERT_ENUM(ui::VKEY_KANA, FWL_VKEY_Kana);
STATIC_ASSERT_ENUM(ui::VKEY_HANGUL, FWL_VKEY_Hangul);
STATIC_ASSERT_ENUM(ui::VKEY_JUNJA, FWL_VKEY_Junja);
STATIC_ASSERT_ENUM(ui::VKEY_FINAL, FWL_VKEY_Final);
STATIC_ASSERT_ENUM(ui::VKEY_HANJA, FWL_VKEY_Hanja);
STATIC_ASSERT_ENUM(ui::VKEY_KANJI, FWL_VKEY_Kanji);
STATIC_ASSERT_ENUM(ui::VKEY_ESCAPE, FWL_VKEY_Escape);
STATIC_ASSERT_ENUM(ui::VKEY_CONVERT, FWL_VKEY_Convert);
STATIC_ASSERT_ENUM(ui::VKEY_NONCONVERT, FWL_VKEY_NonConvert);
STATIC_ASSERT_ENUM(ui::VKEY_ACCEPT, FWL_VKEY_Accept);
STATIC_ASSERT_ENUM(ui::VKEY_MODECHANGE, FWL_VKEY_ModeChange);
STATIC_ASSERT_ENUM(ui::VKEY_SPACE, FWL_VKEY_Space);
STATIC_ASSERT_ENUM(ui::VKEY_PRIOR, FWL_VKEY_Prior);
STATIC_ASSERT_ENUM(ui::VKEY_NEXT, FWL_VKEY_Next);
STATIC_ASSERT_ENUM(ui::VKEY_END, FWL_VKEY_End);
STATIC_ASSERT_ENUM(ui::VKEY_HOME, FWL_VKEY_Home);
STATIC_ASSERT_ENUM(ui::VKEY_LEFT, FWL_VKEY_Left);
STATIC_ASSERT_ENUM(ui::VKEY_UP, FWL_VKEY_Up);
STATIC_ASSERT_ENUM(ui::VKEY_RIGHT, FWL_VKEY_Right);
STATIC_ASSERT_ENUM(ui::VKEY_DOWN, FWL_VKEY_Down);
STATIC_ASSERT_ENUM(ui::VKEY_SELECT, FWL_VKEY_Select);
STATIC_ASSERT_ENUM(ui::VKEY_PRINT, FWL_VKEY_Print);
STATIC_ASSERT_ENUM(ui::VKEY_EXECUTE, FWL_VKEY_Execute);
STATIC_ASSERT_ENUM(ui::VKEY_SNAPSHOT, FWL_VKEY_Snapshot);
STATIC_ASSERT_ENUM(ui::VKEY_INSERT, FWL_VKEY_Insert);
STATIC_ASSERT_ENUM(ui::VKEY_DELETE, FWL_VKEY_Delete);
STATIC_ASSERT_ENUM(ui::VKEY_HELP, FWL_VKEY_Help);
STATIC_ASSERT_ENUM(ui::VKEY_0, FWL_VKEY_0);
STATIC_ASSERT_ENUM(ui::VKEY_1, FWL_VKEY_1);
STATIC_ASSERT_ENUM(ui::VKEY_2, FWL_VKEY_2);
STATIC_ASSERT_ENUM(ui::VKEY_3, FWL_VKEY_3);
STATIC_ASSERT_ENUM(ui::VKEY_4, FWL_VKEY_4);
STATIC_ASSERT_ENUM(ui::VKEY_5, FWL_VKEY_5);
STATIC_ASSERT_ENUM(ui::VKEY_6, FWL_VKEY_6);
STATIC_ASSERT_ENUM(ui::VKEY_7, FWL_VKEY_7);
STATIC_ASSERT_ENUM(ui::VKEY_8, FWL_VKEY_8);
STATIC_ASSERT_ENUM(ui::VKEY_9, FWL_VKEY_9);
STATIC_ASSERT_ENUM(ui::VKEY_A, FWL_VKEY_A);
STATIC_ASSERT_ENUM(ui::VKEY_B, FWL_VKEY_B);
STATIC_ASSERT_ENUM(ui::VKEY_C, FWL_VKEY_C);
STATIC_ASSERT_ENUM(ui::VKEY_D, FWL_VKEY_D);
STATIC_ASSERT_ENUM(ui::VKEY_E, FWL_VKEY_E);
STATIC_ASSERT_ENUM(ui::VKEY_F, FWL_VKEY_F);
STATIC_ASSERT_ENUM(ui::VKEY_G, FWL_VKEY_G);
STATIC_ASSERT_ENUM(ui::VKEY_H, FWL_VKEY_H);
STATIC_ASSERT_ENUM(ui::VKEY_I, FWL_VKEY_I);
STATIC_ASSERT_ENUM(ui::VKEY_J, FWL_VKEY_J);
STATIC_ASSERT_ENUM(ui::VKEY_K, FWL_VKEY_K);
STATIC_ASSERT_ENUM(ui::VKEY_L, FWL_VKEY_L);
STATIC_ASSERT_ENUM(ui::VKEY_M, FWL_VKEY_M);
STATIC_ASSERT_ENUM(ui::VKEY_N, FWL_VKEY_N);
STATIC_ASSERT_ENUM(ui::VKEY_O, FWL_VKEY_O);
STATIC_ASSERT_ENUM(ui::VKEY_P, FWL_VKEY_P);
STATIC_ASSERT_ENUM(ui::VKEY_Q, FWL_VKEY_Q);
STATIC_ASSERT_ENUM(ui::VKEY_R, FWL_VKEY_R);
STATIC_ASSERT_ENUM(ui::VKEY_S, FWL_VKEY_S);
STATIC_ASSERT_ENUM(ui::VKEY_T, FWL_VKEY_T);
STATIC_ASSERT_ENUM(ui::VKEY_U, FWL_VKEY_U);
STATIC_ASSERT_ENUM(ui::VKEY_V, FWL_VKEY_V);
STATIC_ASSERT_ENUM(ui::VKEY_W, FWL_VKEY_W);
STATIC_ASSERT_ENUM(ui::VKEY_X, FWL_VKEY_X);
STATIC_ASSERT_ENUM(ui::VKEY_Y, FWL_VKEY_Y);
STATIC_ASSERT_ENUM(ui::VKEY_Z, FWL_VKEY_Z);
STATIC_ASSERT_ENUM(ui::VKEY_LWIN, FWL_VKEY_LWin);
STATIC_ASSERT_ENUM(ui::VKEY_COMMAND, FWL_VKEY_Command);
STATIC_ASSERT_ENUM(ui::VKEY_RWIN, FWL_VKEY_RWin);
STATIC_ASSERT_ENUM(ui::VKEY_APPS, FWL_VKEY_Apps);
STATIC_ASSERT_ENUM(ui::VKEY_SLEEP, FWL_VKEY_Sleep);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD0, FWL_VKEY_NumPad0);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD1, FWL_VKEY_NumPad1);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD2, FWL_VKEY_NumPad2);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD3, FWL_VKEY_NumPad3);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD4, FWL_VKEY_NumPad4);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD5, FWL_VKEY_NumPad5);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD6, FWL_VKEY_NumPad6);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD7, FWL_VKEY_NumPad7);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD8, FWL_VKEY_NumPad8);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD9, FWL_VKEY_NumPad9);
STATIC_ASSERT_ENUM(ui::VKEY_MULTIPLY, FWL_VKEY_Multiply);
STATIC_ASSERT_ENUM(ui::VKEY_ADD, FWL_VKEY_Add);
STATIC_ASSERT_ENUM(ui::VKEY_SEPARATOR, FWL_VKEY_Separator);
STATIC_ASSERT_ENUM(ui::VKEY_SUBTRACT, FWL_VKEY_Subtract);
STATIC_ASSERT_ENUM(ui::VKEY_DECIMAL, FWL_VKEY_Decimal);
STATIC_ASSERT_ENUM(ui::VKEY_DIVIDE, FWL_VKEY_Divide);
STATIC_ASSERT_ENUM(ui::VKEY_F1, FWL_VKEY_F1);
STATIC_ASSERT_ENUM(ui::VKEY_F2, FWL_VKEY_F2);
STATIC_ASSERT_ENUM(ui::VKEY_F3, FWL_VKEY_F3);
STATIC_ASSERT_ENUM(ui::VKEY_F4, FWL_VKEY_F4);
STATIC_ASSERT_ENUM(ui::VKEY_F5, FWL_VKEY_F5);
STATIC_ASSERT_ENUM(ui::VKEY_F6, FWL_VKEY_F6);
STATIC_ASSERT_ENUM(ui::VKEY_F7, FWL_VKEY_F7);
STATIC_ASSERT_ENUM(ui::VKEY_F8, FWL_VKEY_F8);
STATIC_ASSERT_ENUM(ui::VKEY_F9, FWL_VKEY_F9);
STATIC_ASSERT_ENUM(ui::VKEY_F10, FWL_VKEY_F10);
STATIC_ASSERT_ENUM(ui::VKEY_F11, FWL_VKEY_F11);
STATIC_ASSERT_ENUM(ui::VKEY_F12, FWL_VKEY_F12);
STATIC_ASSERT_ENUM(ui::VKEY_F13, FWL_VKEY_F13);
STATIC_ASSERT_ENUM(ui::VKEY_F14, FWL_VKEY_F14);
STATIC_ASSERT_ENUM(ui::VKEY_F15, FWL_VKEY_F15);
STATIC_ASSERT_ENUM(ui::VKEY_F16, FWL_VKEY_F16);
STATIC_ASSERT_ENUM(ui::VKEY_F17, FWL_VKEY_F17);
STATIC_ASSERT_ENUM(ui::VKEY_F18, FWL_VKEY_F18);
STATIC_ASSERT_ENUM(ui::VKEY_F19, FWL_VKEY_F19);
STATIC_ASSERT_ENUM(ui::VKEY_F20, FWL_VKEY_F20);
STATIC_ASSERT_ENUM(ui::VKEY_F21, FWL_VKEY_F21);
STATIC_ASSERT_ENUM(ui::VKEY_F22, FWL_VKEY_F22);
STATIC_ASSERT_ENUM(ui::VKEY_F23, FWL_VKEY_F23);
STATIC_ASSERT_ENUM(ui::VKEY_F24, FWL_VKEY_F24);
STATIC_ASSERT_ENUM(ui::VKEY_NUMLOCK, FWL_VKEY_NunLock);
STATIC_ASSERT_ENUM(ui::VKEY_SCROLL, FWL_VKEY_Scroll);
STATIC_ASSERT_ENUM(ui::VKEY_LSHIFT, FWL_VKEY_LShift);
STATIC_ASSERT_ENUM(ui::VKEY_RSHIFT, FWL_VKEY_RShift);
STATIC_ASSERT_ENUM(ui::VKEY_LCONTROL, FWL_VKEY_LControl);
STATIC_ASSERT_ENUM(ui::VKEY_RCONTROL, FWL_VKEY_RControl);
STATIC_ASSERT_ENUM(ui::VKEY_LMENU, FWL_VKEY_LMenu);
STATIC_ASSERT_ENUM(ui::VKEY_RMENU, FWL_VKEY_RMenu);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_BACK, FWL_VKEY_BROWSER_Back);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_FORWARD, FWL_VKEY_BROWSER_Forward);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_REFRESH, FWL_VKEY_BROWSER_Refresh);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_STOP, FWL_VKEY_BROWSER_Stop);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_SEARCH, FWL_VKEY_BROWSER_Search);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_FAVORITES, FWL_VKEY_BROWSER_Favorites);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_HOME, FWL_VKEY_BROWSER_Home);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_MUTE, FWL_VKEY_VOLUME_Mute);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_DOWN, FWL_VKEY_VOLUME_Down);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_UP, FWL_VKEY_VOLUME_Up);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_NEXT_TRACK, FWL_VKEY_MEDIA_NEXT_Track);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_PREV_TRACK, FWL_VKEY_MEDIA_PREV_Track);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_STOP, FWL_VKEY_MEDIA_Stop);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_PLAY_PAUSE, FWL_VKEY_MEDIA_PLAY_Pause);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_MAIL, FWL_VKEY_MEDIA_LAUNCH_Mail);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_MEDIA_SELECT,
                   FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_APP1, FWL_VKEY_MEDIA_LAUNCH_APP1);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_APP2, FWL_VKEY_MEDIA_LAUNCH_APP2);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_1, FWL_VKEY_OEM_1);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_PLUS, FWL_VKEY_OEM_Plus);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_COMMA, FWL_VKEY_OEM_Comma);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_MINUS, FWL_VKEY_OEM_Minus);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_PERIOD, FWL_VKEY_OEM_Period);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_2, FWL_VKEY_OEM_2);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_3, FWL_VKEY_OEM_3);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_4, FWL_VKEY_OEM_4);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_5, FWL_VKEY_OEM_5);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_6, FWL_VKEY_OEM_6);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_7, FWL_VKEY_OEM_7);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_8, FWL_VKEY_OEM_8);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_102, FWL_VKEY_OEM_102);
STATIC_ASSERT_ENUM(ui::VKEY_PROCESSKEY, FWL_VKEY_ProcessKey);
STATIC_ASSERT_ENUM(ui::VKEY_PACKET, FWL_VKEY_Packet);
STATIC_ASSERT_ENUM(ui::VKEY_ATTN, FWL_VKEY_Attn);
STATIC_ASSERT_ENUM(ui::VKEY_CRSEL, FWL_VKEY_Crsel);
STATIC_ASSERT_ENUM(ui::VKEY_EXSEL, FWL_VKEY_Exsel);
STATIC_ASSERT_ENUM(ui::VKEY_EREOF, FWL_VKEY_Ereof);
STATIC_ASSERT_ENUM(ui::VKEY_PLAY, FWL_VKEY_Play);
STATIC_ASSERT_ENUM(ui::VKEY_ZOOM, FWL_VKEY_Zoom);
STATIC_ASSERT_ENUM(ui::VKEY_NONAME, FWL_VKEY_NoName);
STATIC_ASSERT_ENUM(ui::VKEY_PA1, FWL_VKEY_PA1);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_CLEAR, FWL_VKEY_OEM_Clear);
STATIC_ASSERT_ENUM(ui::VKEY_UNKNOWN, FWL_VKEY_Unknown);

STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_ANSI, FXFONT_ANSI_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_DEFAULT, FXFONT_DEFAULT_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_SYMBOL, FXFONT_SYMBOL_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_SHIFTJIS, FXFONT_SHIFTJIS_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_HANGUL, FXFONT_HANGEUL_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_GB2312, FXFONT_GB2312_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_CHINESEBIG5,
                   FXFONT_CHINESEBIG5_CHARSET);

STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_NONE, DuplexUndefined);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_SIMPLEX, Simplex);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_SHORT_EDGE, DuplexFlipShortEdge);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_LONG_EDGE, DuplexFlipLongEdge);

STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_UNKNOWN, FPDF_TEXTRENDERMODE_UNKNOWN);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FIRST, FPDF_TEXTRENDERMODE_UNKNOWN);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILL, FPDF_TEXTRENDERMODE_FILL);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_STROKE, FPDF_TEXTRENDERMODE_STROKE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLSTROKE,
                   FPDF_TEXTRENDERMODE_FILL_STROKE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_INVISIBLE,
                   FPDF_TEXTRENDERMODE_INVISIBLE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLCLIP,
                   FPDF_TEXTRENDERMODE_FILL_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_STROKECLIP,
                   FPDF_TEXTRENDERMODE_STROKE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLSTROKECLIP,
                   FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_CLIP, FPDF_TEXTRENDERMODE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_LAST, FPDF_TEXTRENDERMODE_LAST);

STATIC_ASSERT_ENUM(FormType::kNone, FORMTYPE_NONE);
STATIC_ASSERT_ENUM(FormType::kAcroForm, FORMTYPE_ACRO_FORM);
STATIC_ASSERT_ENUM(FormType::kXFAFull, FORMTYPE_XFA_FULL);
STATIC_ASSERT_ENUM(FormType::kXFAForeground, FORMTYPE_XFA_FOREGROUND);
STATIC_ASSERT_ENUM(FormType::kMaxValue, FORMTYPE_COUNT - 1);

STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_PUSHBUTTON, FPDF_FORMFIELD_PUSHBUTTON);
STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_CHECKBOX, FPDF_FORMFIELD_CHECKBOX);
STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_RADIOBUTTON, FPDF_FORMFIELD_RADIOBUTTON);

#if BUILDFLAG(IS_WIN)
STATIC_ASSERT_ENUM(kEmf, FPDF_PRINTMODE_EMF);
STATIC_ASSERT_ENUM(kTextOnly, FPDF_PRINTMODE_TEXTONLY);
STATIC_ASSERT_ENUM(kPostScript2, FPDF_PRINTMODE_POSTSCRIPT2);
STATIC_ASSERT_ENUM(kPostScript3, FPDF_PRINTMODE_POSTSCRIPT3);
STATIC_ASSERT_ENUM(kEmfWithReducedRasterization,
                   FPDF_PRINTMODE_EMF_IMAGE_MASKS);
STATIC_ASSERT_ENUM(kPostScript3WithType42Fonts,
                   FPDF_PRINTMODE_POSTSCRIPT3_TYPE42);
#endif

}  // namespace chrome_pdf
